﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LJ.EventBus.Abstractions.Attributes;


[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
public  class EventHandlerAttribute(string name,string group) : Attribute
{

    /// <summary>
    /// Topic or exchange route key name.
    /// </summary>
    public string Name { get; } = name;

    /// <summary>
    /// Default group name is CapOptions setting.(Assembly name)
    /// Kafka --> groups.id
    /// RabbitMQ --> queue.name
    /// </summary>
    public string Group { get; set; } = group;

}